<!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>中央空调安装方案维护</title>
        <link rel="stylesheet" href="css/reset.css" />
        <link rel="stylesheet" href="css/platform.css" />
        <link rel="stylesheet" href="css/table.css" />
        <style>
            .u-tabs {
                padding: 0 15px;
            }
            
            .u-multiform .column label {
                width: 5em;
            }
            
            .cnt-title {
                width: 100%;
                border-left: 2px solid #ff720d;
                padding-left: 5px;
                margin-bottom: 10px;
                color: #999;
                margin-top: 20px;
            }
            
            .u-btn {
                margin-top: 20px;
            }
            
            .u-btn.gray {
                margin-left: 10px;
            }
            
            .cnt-box.note-len span {
                font-size: 12px;
                margin-left: 5px;
            }
            
            .name-title {
                font-size: 18px;
                height: 40px;
            }
            
            .u-error {
                display: none;
            }
        </style>
    </head>

    <body ms-controller="mainController">
        <div class="header">
            <div class="u-title">中央空调安装方案维护</div>
        </div>
        <div ms-if="curtemp==1">
            <div class="tableWrapper">
                <table class="table">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>房屋户型</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ms-repeat-row="layoutList">
                            <td style="width: 50px;">{{$index+1}}</td>
                            <td>{{row.name}}</td>
                            <td class="operate">
                                <a href="javascript:;" ms-click="editPlan(row)">编辑方案</a>
                            </td>
                        </tr>
                    </tbody>

                </table>
            </div>
        </div>
        <div class="u-tabs" ms-if="curtemp==2">
            <p class="name-title">{{layoutName}}</p>
            <div class="tab-box">
                <div class="tab sel">经济环保</div>
                <div class="tab">中档宜居</div>
                <div class="tab">高档奢华</div>
            </div>
            <div class="cnt-box">
                <div class="cnt">
                    <div class="u-multiform">
                        <div class="column">
                            <div class="cell">
                                <label>购买形式：</label>
                                <div class="cnt-box">
                                    <select ms-duplex="pageObj.tab1.buytype" ms-change="selBuyType()">
                                        <option value="0">单独机型</option>
                                        <option value="1">套机</option>
                                    </select>
                                </div>
                            </div>
                            <div class="cell">
                                <label>空调品牌：</label>
                                <div class="cnt-box brand">
                                    <select ms-duplex="pageObj.tab1.brandtype" ms-change="selBrandType()">
                                        <option ms-repeat-brand="brandList" ms-attr-value="brand.brandCode">{{brand.brandName}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ms-if="pageObj.tab1.selbuytype==0">
                        <div class="place" ms-repeat-buy="pageObj.tab1.buyList">
                            <p class="cnt-title">{{buy.positionName}}</p>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>房间</th>
                                        <th>商品编码</th>
                                        <th>商品名称</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-room="buy.commList">
                                        <td style="width: 400px;">{{room.roomName}}</td>
                                        <td style="width: 300px; text-align: left;">
                                            <input type="hidden" ms-duplex="room.commName" />
                                            <input class="u-ipt" maxlength="9" ms-duplex="room.commCode" placeholder="请输入9位商品编码" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" ms-blur="searchCode()" />
                                            <p class="u-error">请输入正确的商品编码</p>
                                        </td>
                                        <td class="comm-name">{{room.commName}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div ms-if="pageObj.tab1.selbuytype==1">
                        <div class="place2" ms-repeat-buy="pageObj.tab1.buyList2">
                            <p class="cnt-title">{{buy.positionName}}</p>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>房间</th>
                                        <th>商品编码</th>
                                        <th>商品名称</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-room="buy.commList">
                                        <td style="width: 300px;">{{room.roomName}}</td>
                                        <td style="width: 300px; text-align: left;">
                                            <input type="hidden" ms-duplex="room.commName" />
                                            <input class="u-ipt" maxlength="9" ms-duplex="room.commCode" placeholder="请输入9位商品编码" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" ms-blur="searchCode()" />
                                            <p class="u-error">请输入正确的商品编码</p>
                                        </td>
                                        <td>{{room.commName}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <p class="cnt-title">安装备注</p>
                    <div class="u-multiform">
                        <div class="column">
                            <label>安装备注：</label>
                            <div class="cnt-box note-len">
                                <textarea class="u-textarea" ms-duplex="pageObj.tab1.remak" maxlength="50" placeholder="最多可输入50个字"></textarea>
                                <span>(0/50)</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="cnt">
                    <div class="u-multiform">
                        <div class="column">
                            <div class="cell">
                                <label>购买形式：</label>
                                <div class="cnt-box">
                                    <select ms-duplex="pageObj.tab2.buytype" ms-change="selBuyType()">
                                        <option value="0">单独机型</option>
                                        <option value="1">套机</option>
                                    </select>
                                </div>
                            </div>
                            <div class="cell">
                                <label>空调品牌：</label>
                                <div class="cnt-box brand">
                                    <select ms-duplex="pageObj.tab2.brandtype" ms-change="selBrandType()">
                                        <option ms-repeat-brand="brandList" ms-attr-value="brand.brandCode">{{brand.brandName}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ms-if="pageObj.tab2.selbuytype==0">
                        <div class="place" ms-repeat-buy="pageObj.tab2.buyList">
                            <p class="cnt-title">{{buy.positionName}}</p>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>房间</th>
                                        <th>商品编码</th>
                                        <th>商品名称</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-room="buy.commList">
                                        <td style="width: 300px;">{{room.roomName}}</td>
                                        <td style="width: 300px; text-align: left;">
                                            <input type="hidden" ms-duplex="room.commName" />
                                            <input class="u-ipt" maxlength="9" ms-duplex="room.commCode" placeholder="请输入9位商品编码" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" ms-blur="searchCode()" />
                                            <p class="u-error">请输入正确的商品编码</p>
                                        </td>
                                        <td class="comm-name">{{room.commName}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div ms-if="pageObj.tab2.selbuytype==1">
                        <div class="place2" ms-repeat-buy="pageObj.tab2.buyList2">
                            <p class="cnt-title">{{buy.positionName}}</p>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>房间</th>
                                        <th>商品编码</th>
                                        <th>商品名称</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-room="buy.commList">
                                        <td style="width: 300px;">{{room.roomName}}</td>
                                        <td style="width: 300px; text-align: left;">
                                            <input type="hidden" ms-duplex="room.commName" />
                                            <input class="u-ipt" maxlength="9" ms-duplex="room.commCode" placeholder="请输入9位商品编码" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" ms-blur="searchCode()" />
                                            <p class="u-error">请输入正确的商品编码</p>
                                        </td>
                                        <td>{{room.commName}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <p class="cnt-title">安装备注</p>
                    <div class="u-multiform">
                        <div class="column">
                            <label>安装备注：</label>
                            <div class="cnt-box note-len">
                                <textarea class="u-textarea" ms-duplex="pageObj.tab2.remak" maxlength="50" placeholder="最多可输入50个字"></textarea>
                                <span>(0/50)</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="cnt">
                    <div class="u-multiform">
                        <div class="column">
                            <div class="cell">
                                <label>购买形式：</label>
                                <div class="cnt-box">
                                    <select ms-duplex="pageObj.tab3.buytype" ms-change="selBuyType()">
                                        <option value="0">单独机型</option>
                                        <option value="1">套机</option>
                                    </select>
                                </div>
                            </div>
                            <div class="cell">
                                <label>空调品牌：</label>
                                <div class="cnt-box brand">
                                    <select ms-duplex="pageObj.tab3.brandtype" ms-change="selBrandType()">
                                        <option ms-repeat-brand="brandList" ms-attr-value="brand.brandCode">{{brand.brandName}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ms-if="pageObj.tab3.selbuytype==0">
                        <div class="place" ms-repeat-buy="pageObj.tab3.buyList">
                            <p class="cnt-title">{{buy.positionName}}</p>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>房间</th>
                                        <th>商品编码</th>
                                        <th>商品名称</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-room="buy.commList">
                                        <td style="width: 300px;">{{room.roomName}}</td>
                                        <td style="width: 300px; text-align: left;">
                                            <input type="hidden" ms-duplex="room.commName" />
                                            <input class="u-ipt" maxlength="9" ms-duplex="room.commCode" placeholder="请输入9位商品编码" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" ms-blur="searchCode()" />
                                            <p class="u-error">请输入正确的商品编码</p>
                                        </td>
                                        <td class="comm-name">{{room.commName}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div ms-if="pageObj.tab3.selbuytype==1">
                        <div class="place2" ms-repeat-buy="pageObj.tab3.buyList2">
                            <p class="cnt-title">{{buy.positionName}}</p>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>房间</th>
                                        <th>商品编码</th>
                                        <th>商品名称</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr ms-repeat-room="buy.commList">
                                        <td style="width: 300px;">{{room.roomName}}</td>
                                        <td style="width: 300px; text-align: left;">
                                            <input type="hidden" ms-duplex="room.commName" />
                                            <input class="u-ipt" maxlength="9" ms-duplex="room.commCode" placeholder="请输入9位商品编码" onafterpaste="this.value=this.value.replace(/\D/g,'')" onkeyup="this.value=this.value.replace(/\D/g,'')" ms-blur="searchCode()" />
                                            <p class="u-error">请输入正确的商品编码</p>
                                        </td>
                                        <td>{{room.commName}}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <p class="cnt-title">安装备注</p>
                    <div class="u-multiform">
                        <div class="column">
                            <label>安装备注：</label>
                            <div class="cnt-box note-len">
                                <textarea class="u-textarea" ms-duplex="pageObj.tab3.remak" maxlength="50" placeholder="最多可输入50个字"></textarea>
                                <span>(0/50)</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <button class="u-btn small" ms-click="save">保存</button>
            <button class="u-btn small gray" ms-click="returnTop">返回</button>
        </div>

        <div class="u-popup" id="popup_confirm">
            <div class="bg"></div>
            <div class="asTable">
                <div class="asTableCell">
                    <div class="asCell alert">
                        <a href="javascript:;" class="close btn-close">×</a>
                        <p class="title">提示</p>
                        <div class="container">
                            <div class="warning"></div>
                            <p ms-if="confirmType==1">还有方案未保存，确定要离开吗？</p>
                            <p ms-if="confirmType==2">更换购买形式后需要重新选择机型，确定要更换吗？</p>
                            <p ms-if="confirmType==3">更换品牌后需要重新选择机型，确定要更换吗？</p>
                        </div>
                        <div class="btn-box">
                            <button class="u-btn" ms-click="confirmSure()">确定</button>
                            <button class="u-btn gray btn-close">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="u-popup" id="popup_tips">
            <div class="bg"></div>
            <div class="asTable">
                <div class="asTableCell">
                    <div class="asCell alert">
                        <a href="javascript:;" class="close btn-close">×</a>
                        <p class="title">提示</p>
                        <div class="container">
                            <div class="error"></div>
                            <p></p>
                        </div>
                        <div class="btn-box">
                            <button class="u-btn btn-close">确定</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="loadData"></div>
        <script src="js/jquery.min.js"></script>
        <script src="js/avalon.shim.sn.js"></script>
        <script src="js/swift-ui-table-1.1.js"></script>
        <script src="js/platform.js"></script>
        <script src="js/DataInterface/DataInterface.js"></script>
        <script src="js/airconditioner-maintain.js?v=20161103"></script>
    </body>

</html>
